#ifndef __THREAD_POOL__
#define __THREAD_POOL__
#include<func.h>
#include"taskQeuen.h"
//线程池的结构体
typedef struct threadPool_s
{
    //记录线程个数
    int threadNum;
    //记录pid 的数组
    pthread_t *pidArr;
    //锁
    pthread_mutex_t mutex;
    //条件变量
    pthread_cond_t cond;
    //消息队列
    netList_t taskQeuen;

}threadPool_t;
#endif
// Init threadPool 然后创建线程池
int creatPool(threadPool_t *pool,int workerNum);
//create worker
int makeWorker(threadPool_t *pool);
//pthreadFunc
void*pthreadFunc(void*args);
//tcp init
int tcpInit(char *ip,char *port,int *psockfd);
//epoll add
int epollAdd(int epfd,int fd);
//epoll delete
int epollDelet(int epfd,int fd);